package sector.soda.states;

import com.jme3.app.Application;
import com.jme3.app.state.AppState;
import com.jme3.app.state.AppStateManager;
import com.jme3.renderer.RenderManager;
import sector.soda.Main;
import sector.soda.util.MyLogger;

/**
 *
 * @author cheesecake
 */
public class BaseGameState implements AppState {   
    
    protected static MyLogger logger = Main.log;    
    protected boolean initialized = false;
    private boolean active = true;

    public void initialize(AppStateManager stateManager, Application app) {
        initialized = true;
    }

    public boolean isInitialized() {
        return initialized;
    }

    public void setActive(boolean active) {
        this.active = active;
    }

    public boolean isActive() {
        return active;
    }

    public void stateAttached(AppStateManager stateManager) {
    }

    public void stateDetached(AppStateManager stateManager) {
        cleanup();
    }

    public void render(RenderManager rm) {
    }

    public void postRender() {
    }

    public void cleanup() {
        initialized = false;
    }

    public void update(float tpf) {
    }
}
